---
title: Validate is-PDF
summary: Reports whether submitted bytes are a valid PDF, returning false rather than throwing for a non-PDF payload.
status: draft
owner: Not determined from source
last_reviewed: 2026-09-17
library: PdfAPI
reference_type: embedded
operation_id: OP-IS-PDF
trigger: Client submits POST v1/info/validate with arbitrary bytes
---

# OP-IS-PDF: Validate is-PDF

Reports whether the submitted bytes carry a valid PDF file signature.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-IS-PDF |
| **Trigger** | Client submits `POST v1/info/validate` with arbitrary bytes |
| **Entry endpoint** | [`POST v1/info/validate`](../endpoints/info-controller.md#post-v1%2Finfo%2Fvalidate) |
| **Owning component** | `InfoController.IsPdf(byte[])` → `PdfClientService.IsPdf(byte[])` |
| **Inputs** | Request body: `byte[]` |
| **Outputs** | Bare `bool` |
| **Failure response** | Always returns `200`; no failure path is triggered by a non-PDF payload |

## Steps

1. `PdfClientService.IsPdf` checks the `%PDF-` file signature and returns `true`/`false` rather than throwing on a non-PDF payload ([BR-PDFAPI-005](../business-rules.md#br-pdfapi-005-pdf-validity-by-file-signature)).

   This check is implemented in `PdfAPI.Core` (`PdfClientService.IsPdf`), documented in full at [Test whether bytes are a PDF](../../../libraries/pdfapi-core/operations/op-03-test-whether-bytes-are-a-pdf.md) (OP-03); its behavior is summarized here only as observed on this request path.

   > **Origin:** The file-signature check described in this step is implemented in `PdfAPI.Core`,
   > not in `PdfAPI`. See the linked operation page for the full delegated logic.
2. The bare `bool` is returned — HTTP `200`.

## Process flow

The following diagram shows the file-signature check sequence.

```mermaid
flowchart TD
    A["POST v1/info/validate"] --> B["IsPdf: check file signature"]
    B --> C["Return true/false, 200"]
```

## Transaction and side effects

| Aspect | Finding |
| --- | --- |
| Unit of work | None |
| Commit point | Not applicable — no database access |
| Records written | None |
| Downstream calls | None |
| Repeat-call behavior | Read-only; safe to repeat |

## Logging

| Surface | Written content |
| --- | --- |
| — | No dedicated logging observed on this path |

## Error handling

- No error status codes are identified on this path — a non-PDF payload returns `false` rather than failing ([BR-PDFAPI-005](../business-rules.md#br-pdfapi-005-pdf-validity-by-file-signature)).

## Related documentation
- [API index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Endpoints](../endpoints.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Data model](../data-model.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

## Sources
- PdfAPI\Controllers\v1\InfoController.cs
- PdfAPI.Core\Services\PdfClientService.cs
